package ml.kgc.dao.impl;

import ml.kgc.dao.Base;
import ml.kgc.dao.NewsCategoryDao;
import ml.kgc.pojo.NewsCategory;

public class NewsCategoryDaoImpl extends Base implements NewsCategoryDao {

    public boolean deleteNewsCategory(NewsCategory newsCategory) {
        Boolean flag = false;
        String sql = "delete from  news_category where id = ?";
        Object[] params = {newsCategory.getId()};
        int i = this.executeUpdate(sql,params);
        if(i>0){
            System.out.println("删除成功！");
            flag = true;
        }
        this.closeResource();
        return flag;
    }




}
